package me.zhengjie.modules.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Teachaudit;
import me.zhengjie.modules.system.mapper.TeachauditMapper;
import me.zhengjie.modules.system.service.TeachauditService;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class TeachauditServiceImpl extends ServiceImpl<TeachauditMapper, Teachaudit> implements TeachauditService {

    @Override
    public void create(Teachaudit resources) {
        save(resources);
    }

    @Override
    public void update(Teachaudit resources) {
        Teachaudit teachaudit = getById(resources.getId());
        teachaudit.copy(resources);
        saveOrUpdate(teachaudit);
    }
}
